package com.sumainfor.pc.market.service.dev;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.dao.dev.HousingConditionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 根据房源状态查询房源
 * <p>
 *
 * @author: zhoucong
 * @create: 2019-05-01 14:26
 **/
@Service
public class HousingConditionService implements Serializable {


    @Autowired
    HousingConditionMapper housingConditionMapper;

    /**
     * 根据状态查询房源
     * @param params
     * @return
     */
    public List<Map<String,Object>> selectHousingCondition(Map<String,Object> params){
        return housingConditionMapper.selectHousingCondition(params);
    }

    /**
     * 项目下拉框
     * @return
     */
    public JsonResult getCommunityList(Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(housingConditionMapper.getCommunityList(params));
    }


    public List<Map<String,Object>> selectHousingHouInfoId(Map<String,Object> params){
        return housingConditionMapper.selectHousingHouInfoId(params);
    }

    /**
     * 根据房源详表编号获取房源上架状态
     * @param params
     * @return
     */
    public List<Map<String,Object>> getHouInfoIdState(Map<String,Object> params){
        return housingConditionMapper.getHouInfoIdState(params);
    }
}
